var city = [
	{ "name": "广东省", "info": ['广州市', '深圳市', '佛山市', '珠海市'] },
	{ "name": "四川省", "info": ['成都市', '德阳市', '绵阳市', '广元市'] },
	{ "name": "云南省", "info": ['昆明市', '大理市', '丽江市'] },
	{ "name": "贵州省", "info": ['贵阳市', '遵义市'] }
];
window.onload = function () {
	for (var i in city) {
		document.getElementById("province").innerHTML += "<option>" + city[i].name + "</option>"
	}

}

function loadCity() {
	var prov=document.getElementById("province").value;	
	for (var i in city) {
		if(city[i].name==prov){			
			var cities=document.getElementById("city");
			cities.innerHTML="<option>--请选择--</option>";
	        for(var j in city[i].info){
		    cities.innerHTML +="<option>" + city[i].info[j] + "</option>";
	        }
		}
	}
}
